﻿@model DateTime?
@using Microsoft.AspNetCore.Http
@inject IHttpContextAccessor HttpContextAccessor
@if(HttpContextAccessor.HttpContext.Request.Headers["User-Agent"].Contains("Chrome"))
{
    @Html.TextBoxFor(m => m, new { type = "date", value = Model, @class = "form-control" })
}
else if (HttpContextAccessor.HttpContext.Request.Headers["User-Agent"].Contains("Edge"))
{
    @Html.TextBoxFor(m => m, new { type = "date", value = Model, @class = "form-control" })
}
else
{
    @Html.TextBoxFor(m => m, new { type = "date", value = Model, @class = "form-control" })
@*@Html.TextBox("", Model.HasValue ? Model.Value.ToString("dd/MM/yyyy") : "", new { @class = "date form-control" })
<script type="text/javascript">
    $(function () {
        $("#@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)").datepicker({ dateFormat: "dd/mm/yy" });
    });
</script>*@
}
